package kandl.automation.reporting.testrail.model;

import org.codehaus.jackson.annotate.JsonCreator;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.annotate.JsonProperty;

import java.util.Arrays;
import java.util.List;

@JsonIgnoreProperties(ignoreUnknown = true)
public class TestRailPlan {

    private final String id;

    private final List<TestRailEntry> entries;

    @JsonCreator
    public TestRailPlan(@JsonProperty("id") String id, @JsonProperty("entries") TestRailEntry... entries) {
        this.id = id;
        this.entries = Arrays.asList(entries);
    }

    public String getId() {
        return id;
    }

    public List<TestRailEntry> getEntries() {
        return entries;
    }
}
